/************************************************************************
  * Copyright(c) 2023 Levetop Semiconductor Co.,Led. All rights reserved.
  * @file     qspi.h
  * @author   UartTFT Application Team
  * @version  V0.0.1
  * @date     2023-01-01
  * @brief    
 *************************************************************************/

#ifndef _QSPI_H
#define _QSPI_H

#include "ssi_reg.h"

void SSI1_STD_Init(SSI_TypeDef *SSIx);
void SSI1_STD_DMA_Send(SSI_TypeDef *SSIx, int32_t dma_ch, uint8_t *psend, uint32_t addr, uint32_t length, BOOL binten);

void SSI1_QUAD_Init(int32_t read, int32_t num, int32_t frame_len, int32_t cmd_len, int32_t addr_len, int32_t dummy_len);
void SSI1_QUAD_Transmit_TX(uint8_t *buf, uint32_t addr, int32_t num);
void SSI1_QUAD_Transmit_DMA(int32_t read, int32_t buf_model, uint16_t *buff, uint32_t num);
void SSI1_QUAD_Transmit_DMA_Waite(void);

#define SSI_8BIT 0x7
#define SSI_16BIT 0xf
#define SSI_TX 0
#define SSI_RX 1
#define BUF_INCR 0 // increment
#define BUF_DECR 1 // decrement
#define BUF_NOCR 2 // nocrement


#endif /* _QSPI_H */
